Documentation for Users  2.1.2
Perception Toolbox for Virtual Reality (PTVR) Manual
The3DWorld Class Reference

Public Member Functions

def __init__ (self, name_of_subject="DummyUser", resultsPath="", output_headset_data_and_collisions=False, output_raw_sranipall_gaze_data=False, output_gaze_data_and_collisions=False, output_hand_controller_data_and_collisions=False, hand_controller_save_sampling_period=10, gaze_save_sampling_period=10, hand_controller_events_are_recorded=False, headset_save_sampling_period=10, operatorMode=False, activate_eyetracking=False, headset_manufacturer="Vive")
 
def set_monocular (self, masked_eye=MaskedEye.LEFT_EYE, masked_eye_background_color=color.RGB255Color())
 
def translate_coordinate_system_along_global (self, translation=np.array([0.0, 0.0, 0.0]))
 
def translate_coordinate_system_along_current (self, translation=np.array([0.0, 0.0, 0.0]))
 
def rotate_coordinate_system_about_current_x (self, rotation_deg)
 
def rotate_coordinate_system_about_current_y (self, rotation_deg)
 
def rotate_coordinate_system_about_current_z (self, rotation_deg)
 
def rotate_coordinate_system_about_global_x (self, rotation_deg)
 
def rotate_coordinate_system_about_global_y (self, rotation_deg)
 
def rotate_coordinate_system_about_global_z (self, rotation_deg)
 
def get_axes (self)
 
def get_rightward_axis (self)
 
def get_upward_axis (self)
 
def get_forward_axis (self)
 
def get_position (self)
 
def get_coordinate_system (self)
 
def reset_coordinate_system (self)
 
def SetIdScene (self, count)
 
def add_scene (self, individual_scene=PTVR.Stimuli.Scenes.Scene())
 
def write_calculators (self, fp)
 
def write_metadata (self, fp)
 
def write_scenes (self, fp)
 
def write (self)
 

Data Fields

 calculatorManager
 
 created
 
 details3DWorld
 
 handControllerLeft
 
 handControllerRight
 
 headset_manufacturer
 
 character_controller
 
 headset
 
 eyeLeft
 
 eyeRight
 
 eyeCombined
 
 originCurrentCS
 
 originGlobalCS
 
 coordinate_system
 
 last_coordinate_system_index
 
 provided_results_path
 
 eyetracking
 
 results_path
 
 user
 
 scenes
 
 leftBlind
 
 rightBlind
 
 headSaveSamplingPeriod
 
 handControllerSaveSamplingPeriod
 
 gazeSaveSamplingPeriod
 
 hasOperator
 
 origin
 
 outputHead
 
 outputRawSranipal
 
 outputLaser
 
 outputGaze
 
 hand_controller_events_are_recorded
 
 countValue
 
 leftBackgroundColor
 
 rightBackgroundColor
 
 translation_vector
 

Static Public Attributes

dictionary custom_data = {}
 
list id_scene = []
 
list coordinate_system = []
 

Private Member Functions

def __add_a_coordinate_system (self, vt)
 
def _create_folder_description_files (self, path_to_json_directory)
 

Detailed Description

See PTVR Documentation:
-----------------
    https://ptvr_public.gitlabpages.inria.fr/PTVR_Researchers/recording_handcontroller_etc.html

Parameters
----------

resultsPath: String
    By default, the results file is saved in ...
        ...\PTVR_Researchers\PTVR_Operators\Results.
    If you want to use another directory, create your own
    (for instance : "C://great_folder//").
    See Documentation: 
        https://ptvr_public.gitlabpages.inria.fr/PTVR_Researchers/results_of_an_experiment.html
    and
        https://ptvr_public.gitlabpages.inria.fr/PTVR_Researchers/change_location0f_results_file.html


output_headset_data_and_collisions: True or False
    Record headset data in a distinct file.

    Some essential headset data are output along with collision data (see
    PTVR Documentation).

    Sampling period is defined by headset_save_sampling_period.

headset_save_sampling_period :
    It is used when output_headset_data_and_collisions is True.

    Must not be smaller than 10 ms.         


output_hand_controller_data_and_collisions:   True or False
    Record handcontroller data in a distinct file.

    Some essential handcontroller data are output along with collision data 
    (see PTVR Documentation).

    Sampling period is defined by hand_controller_save_sampling_period.

hand_controller_save_sampling_period: 
    It is used when output_hand_controller_data_and_collisions is True.    

    Must not be smaller than 10 ms.


output_raw_sranipall_gaze_data: True or False
    Record eye/gaze data in a distinct file.

    All the data (including for ex. pupil size) provided by the Sranipal 
    software are output.

    The sampling period is the one of the headset's eyetracker (for example,
    for the HTC Vive Pro, it is ~8 ms as the eyetracking sampling rate is 
    120 Hz ).       

    In July 2025, PTVR still uses the Sranipal eyetracking application.
    OpenXR will be used instead of Sranipal if possible.   

output_gaze_data_and_collisions: True or False
    Record eye/gaze data in a distinct file.

    Some essential eye data are output along with collision data. This is
    the same principle as when output_headset_data_and_collisions or 
    output_hand_controller_data_and_collisions are set to True.

    Sampling period is defined by gaze_save_sampling_period.

    Note for output_raw_sranipall_gaze_data and output_gaze_data_and_collisions:

    they can be both set to True.



gaze_save_sampling_period:
    It is used when output_gaze_data_and_collisions is True.

    This sampling period is approximately the refresh period of the headset's
    screen (HTV Vive Pro eyetracker: ~11 ms as refresh rate is 90Hz)

hand_controller_events_are_recorded:    True or False
    It is used if 'output_hand_controller_data_and_collisions' is True. 

    In this case, the file used to record handcontroller data will 
    contain columns indicating which handcontroller events were recorded
    during the experiment.
    See Documentation: https://ptvr_public.gitlabpages.inria.fr/PTVR_Researchers/recording_handcontroller_etc.html       

eyetracking: True or False 
    This parameter is used to save time when you do not
    use eyetracking during an experiment.

    If false, the eyetracking software (Sranipal) will not 
    be launched, thus allowing the script to start quickly.

    If true, the script will start running after a longer delay and you 
    will be able to use eyetracking (Sranipal software).

headset_manufacturer : "Vive" (default) or "Oculus" or "ViveFocusVision"
    "Vive" refers to the HTC Vive pro series headsets.

    "Oculus" refers to Quest 1, 2 or 3 headsets (in keeping with OpenXR terminology).

    "ViveFocusVision": for the HTC Vive 'Focus Vision'.
    
Returns
-------
None.

Definition at line 63 of file Visual.py.


The documentation for this class was generated from the following file: